﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcCarConsume.WebUI.CarInView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Detail
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MoreLinks" runat="server"> 
    <% Html.RenderAction("Menu","CarView"); %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <%if (Model != null)
      { %>
        <div style="margin-top:10px">
        <table>
            <tr>
                <td>
                    <img alt="<%: Model.CarName %>" src="<%: Html.PicShow(Model.CarID) %>"/>
                </td>
                <td>
                    <%: Html.Resource("CarViewListItemPriceText")%>
                    <%: Model.CarPrice%>
                    <%: Html.Resource("CarViewListItemPriceUnitText")%> 
                </td>
                <td>
                    <%: Html.ActionLink("Add to Cart", "PostCart", "CarCart", new { id = Model.CarID }, null)%>
                </td>
            </tr>
            <tr>
                <td colspan ="3">
                    <%: Html.Resource("CarViewListItemIDText")%>
                    <%: Model.CarID%>
                </td>
            </tr>
            <tr>
                <td colspan ="3">
                    <%: Html.Resource("CarViewListItemBrandText")%>
                    <%: Model.CarName%>  
                </td>
            </tr>
            <tr>
                <td colspan ="3">
                    <%: Html.Resource("CarViewListItemDescriptionText")%>
                    <%: Model.CarDescription%>  
                </td>
            </tr>
        </table>
        </div>
    <%}else{ %>
        <h1><%:string.Format(Html.Resource("CarViewDetailNoCarError")) %></h1>
    <%} %>
</asp:Content>
